<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

        <title>栏目列表</title>

        <link href="/Public/css/mine.css" type="text/css" rel="stylesheet" />
    </head>
    <body>
        <style>
            .tr_color{background-color: #9F88FF}
        </style>
        <div class="div_head">
            <span>
                <span style="float: left;">当前位置是：栏目管理->栏目列表</span>
                <span style="float: right; margin-right: 8px; font-weight: bold;">
                    <a style="text-decoration: none;" href="/index.php/admin/cat/columnadd" target="_self">【添加栏目】</a>
                </span>
            </span>
        </div>
        <div></div>
        <div class="div_search">
            <span>
                <form action="#" method="get">
                    品牌<select name="s_product_mark" style="width: 100px;">
                        <option selected="selected" value="0">请选择</option>
                        <option value="1"></option>
                    </select>
                    <input value="查询" type="submit" />
                </form>
            </span>
        </div>
        <div style="font-size: 13px; margin: 10px 5px;">
            <table class="table_a" border="1" width="100%">
                <tbody><tr style="font-weight: bold;">
                        <td>栏目ID</td>
                        <td>栏目名称</td>
                        <td>栏目描述</td>
                        <td>父级ID</td>
                        <td>栏目添加(Time)</td>
                        <td>栏目修改(Time)</td>
                        <td align="center" colspan="2">操作</td>
                    </tr>
            <?php if(is_array($tree)): foreach($tree as $key=>$t): if($t['parent_id'] == 0): ?><tr id="product1">
                        <td><?php echo ($t['cat_id']); ?></td>
                        <td><a href="#"><font color="red"><?php echo ($t['cat_name']); ?></font></a></td>
                        <td><?php echo ($t['intro']); ?></td>
                        <td><?php echo ($t['parent_id']); ?></td>
                        <td><?php echo (date("Y-m-d H:i",$t['add_time']))?></td>
                    <?php if($t['lasttime'] == 0): ?><td><font color='green'>未修改过</font></td>
                        <?php else: ?>
                        <td><font color='red'><?php echo (date("Y-m-d H:i",$t['last_time']))?></font></td><?php endif; ?> 
                        <td><a href="/index.php/admin/cat/xiugai">修改</a></td>
                        <td><a href="javascript:;" onclick="delete_product(1)">删除</a></td>
                    </tr><?php endif; ?>
                <?php if(is_array($tree)): foreach($tree as $key=>$t1): if($t1['parent_id'] == $t['cat_id']): ?><tr id="product1">
                        <td>&nbsp;<?php echo ($t1['cat_id']); ?></td>
                        <td><a href="#">&nbsp;&nbsp;<?php echo ($t1['cat_name']); ?></a></td>
                        <td><?php echo ($t1['intro']); ?></td>
                        <td><?php echo ($t1['parent_id']); ?></td>
                        <td><?php echo (date("Y-m-d H:i",$t1['add_time']))?></td>
                    <?php if($t1['lasttime'] == 0): ?><td><font color='green'>未修改过</font></td>
                        <?php else: ?>
                        <td><font color='red'><?php echo (date("Y-m-d H:i",$t1['last_time']))?></font></td><?php endif; ?> 
                        <td><a href="/index.php/admin/cat/xiugai">修改</a></td>
                        <td><a href="javascript:;" onclick="delete_product(1)">删除</a></td>
                    </tr><?php endif; endforeach; endif; endforeach; endif; ?>
                    <tr>
                        <td colspan="20" style="text-align: center;">
                            [1]
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </body>
</html>